<template>
  HelloWorld
  <br />
  {{ count }}
  <br />
  <button @click="btnClick">点击</button>
</template>

<script>
import { ref } from 'vue'
export default {
  name: 'HelloWorld',
  setup(props) {
    // setup函数内部无法使用this
    const count = ref(0)
    console.log(props)
    const btnClick = () => {
      count.value += 1
    }
    return {
      count,
      btnClick,
    }
  },
}
</script>
<style scoped></style>
